package com.novax.ex.activity.open.api.inner;

import com.novax.ex.activity.open.model.request.task.TaskLanguageRequest;
import com.novax.ex.activity.open.model.request.task.TaskRewardRequest;
import com.novax.ex.activity.open.model.response.task.TaskLanguageResponse;
import com.novax.ex.activity.open.model.response.task.TaskRewardInnerResponse;
import com.novax.ex.activity.open.model.response.task.TaskTitleResponse;
import com.novax.ex.common.results.ReturnResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import jakarta.validation.Valid;
import java.util.List;

/**
 * @Description 后管 标题简介配置
 * @Author ChenXi
 * @Date 2023/06/25/10:18
 */

@Tag(name = "后台 新手引导标题简介配置", description = "后台 新手引导标题简介配置")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "TaskTitleApi", contextId = "TaskTitleApi")
public interface TaskTitleApi {

    @Operation(summary = "标题查询")
    @GetMapping(value = "/v3/private/task/steps")
    ReturnResult<List<TaskTitleResponse>> queryAll();

    @Operation(summary = "标题简介多语言查询")
    @GetMapping(value = "/v3/private/task/steps/{id}/contents")
    ReturnResult<List<TaskLanguageResponse>> queryAllByTitle(@PathVariable Long id);

    @Operation(summary = "标题简介多语言编辑")
    @PostMapping(value = "/v3/private/task/steps/contents/{id}")
    ReturnResult<?> modify(@RequestHeader("language") String language,
                           @PathVariable Long id,
                           @RequestBody TaskLanguageRequest taskLanguageRequest);

    @Operation(summary = "标题简介多语言新增")
    @PostMapping(value = "/v3/private/task/steps/{id}/contents")
    ReturnResult<?> add(@RequestHeader("language") String language,
                        @PathVariable Long id,
                        @RequestBody @Valid TaskLanguageRequest taskLanguageRequest,
                        BindingResult bindingResult);
}
